import 'react-native';
import React, { Component } from 'react';
import Index from '../index.ios.js';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

it('renders correctly', () => {
  const tree = renderer.create(
    <Index />

  );
});


class PizzaTranslator extends Component {
    constructor(props) {
        super(props);
        this.state = {text: ''};
    }

    render() {
        return (
            <View style={{padding: 30,flex:1,alignItems:'center',}}>
              <TextInput
                  style={{height: 40}}
                  placeholder="请输入你的账号"
                  onChangeText={(text) => this.setState({text})}
              />
              <TextInput
                  style={{height: 40}}
                  placeholder="请输入你的密码"
                  onChangeText={(text) => this.setState({text})}
              />
              <Text style={{padding: 10, fontSize: 32}}>
                  {this.state.text.split(' ').map((word) => word && '#').join(' ')}
              </Text>
            </View>
        );
    }
}
